#ifndef TESTQPROPERTY_H
#define TESTQPROPERTY_H

#include <Qobject>


//将窗口title变成Hello World
class   TestObject:public QObject{
    Q_OBJECT
    public:
    explicit TestObject(QObject *parent = nullptr);
    // QString  title  是定义在qml端的属性类型和对应的名称      READ title WRITE set_title  是在c++这边读写该属性的方法
    Q_PROPERTY(QString  title READ title WRITE set_title NOTIFY title_changed)
    QString title();
    void set_title(QString title);


signals:
    void title_changed();


public slots:

private:
    QString title_;

};



#endif // TESTQPROPERTY_H
